#include <iostream>

using namespace std;

int main()
{
	int T;
	cin >> T;
	
	while (T -- )
	{
		int a, b;
		cin >> a >> b;
		
		if (a == 1 && b == 2 || b == 1 && a == 2) puts("Yes");
		else puts("No");
		
	}
	
	return 0;
}